//
//  ZhiZuoRenViewController.m
//  UI_HLJ_Frame
//
//  Created by dlios on 15-7-1.
//  Copyright (c) 2015年 毕宏伟. All rights reserved.
//

#import "ZhiZuoRenViewController.h"

#define WIDTH self.view.frame.size.width
#define HEIGHT self.view.frame.size.height

@interface ZhiZuoRenViewController ()<UIScrollViewDelegate>

@property(nonatomic, retain)UIScrollView *scrollView;

@end

@implementation ZhiZuoRenViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.title = @"制作人";
    [self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"制作人图片"]]];
    
    // 建立scrollview
    self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
    self.scrollView.delegate = self;
    [self.view addSubview:self.scrollView];
    [self.scrollView release];
    
    // 建立imageView,创建4个图片
    UIImageView *image1 = [[UIImageView alloc] initWithFrame:CGRectMake(WIDTH * 5 / 60, HEIGHT / 7, WIDTH / 6, HEIGHT / 12)];
    [self.scrollView addSubview:image1];
    image1.backgroundColor = [UIColor orangeColor];
    image1.image = [UIImage imageNamed:@"mao"];
    [image1 release];
    
    UIImageView *image2 = [[UIImageView alloc] initWithFrame:CGRectMake(WIDTH * 18 / 60, HEIGHT / 7, WIDTH / 6, HEIGHT / 12)];
    [self.scrollView addSubview:image2];
    image2.backgroundColor = [UIColor orangeColor];
    image2.image = [UIImage imageNamed:@"mao"];
    [image2 release];
    
    UIImageView *image3 = [[UIImageView alloc] initWithFrame:CGRectMake(WIDTH * 31 / 60, HEIGHT / 7, WIDTH / 6, HEIGHT / 12)];
    [self.scrollView addSubview:image3];
    image3.backgroundColor = [UIColor orangeColor];
    image3.image = [UIImage imageNamed:@"mao"];
    [image3 release];
    
    UIImageView *image4 = [[UIImageView alloc] initWithFrame:CGRectMake(WIDTH * 44 / 60, HEIGHT / 7, WIDTH / 6, HEIGHT / 12)];
    [self.scrollView addSubview:image4];
    image4.backgroundColor = [UIColor orangeColor];
    image4.image = [UIImage imageNamed:@"mao"];
    [image4 release];
    
    
    // 创建四个label,写在图片下面的文字
    UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH * 5 / 60, HEIGHT * 1.6 / 7, WIDTH / 6, HEIGHT / 30)];
    [self.scrollView addSubview:label1];
    //    label1.backgroundColor = [UIColor orangeColor];
    label1.text = @"W";
    label1.font = [UIFont systemFontOfSize:14];
    label1.textAlignment = 1;
    [label1 release];
    
    UILabel *label2 = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH * 18 / 60, HEIGHT * 1.6 / 7, WIDTH / 6, HEIGHT / 30)];
    [self.scrollView addSubview:label2];
    //    label2.backgroundColor = [UIColor orangeColor];
    label2.text = @"P";
    label2.font = [UIFont systemFontOfSize:14];
    label2.textAlignment = 1;
    [label2 release];
    
    UILabel *label3 = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH * 31 / 60, HEIGHT * 1.6 / 7, WIDTH / 6, HEIGHT / 30)];
    [self.scrollView addSubview:label3];
    //    label3.backgroundColor = [UIColor orangeColor];
    label3.text = @"W";
    label3.font = [UIFont systemFontOfSize:14];
    label3.textAlignment = 1;
    [label3 release];
    
    UILabel *label4 = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH * 44 / 60, HEIGHT * 1.6 / 7, WIDTH / 5, HEIGHT / 30)];
    [self.scrollView addSubview:label4];
    //    label4.backgroundColor = [UIColor orangeColor];
    label4.text = @"W";
    label4.font = [UIFont systemFontOfSize:14];
    label4.textAlignment = 1;
    [label4 release];
    
    
    UILabel *labelWZ = [[UILabel alloc] initWithFrame:CGRectMake(WIDTH / 5, HEIGHT * 2.2 / 7, WIDTH * 3 / 5, HEIGHT * 2 / 3)];
    [self.scrollView addSubview:labelWZ];
    //    labelWZ.backgroundColor = [UIColor orangeColor];
    labelWZ.alpha = 1;
    labelWZ.text = @"我们是一直年轻的团队,我们也拥有自己的梦想,我们一直在为梦想努力奋斗着。我们都有一片属于自己的荒漠，我们既是金子，亦是淘金者；我们既是种子，更是播种者。很多时候，我们成不了闪光的金子，但可以成为希望的种子。漉沙淘金需要冒险的勇气，播撒绿荫需要耕耘的坚韧。金子是被动等待的，或许永远与沙砾为伍；种子是积极主动的，它随时能够拱土而出，迎向风雨。希望我们'三WP'团队能够迎难而上,闯出一片属于自己的天空。";
    labelWZ.font = [UIFont systemFontOfSize:14];
    labelWZ.numberOfLines = 0;
    [labelWZ sizeToFit];
    labelWZ.textAlignment = NSTextAlignmentLeft;
    [labelWZ release];
    self.scrollView.contentSize = CGSizeMake(0, HEIGHT * 2.1 / 5 + labelWZ.frame.size.height);
}

- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
